#include <stdio.h>
#include <stdlib.h>
#include "Hw3Types.h"
#include "Hw3TypesExtended.h"
#include "IspImage.h"
#include "TestFunctions.h"
/*
HANDLE *hReadEvents = NULL;
TImageReaderAndProperties ImageReaderAndProperties;
TBoxSize FaceSize;
IspImage Image;
TFace *FacebookHead=NULL;
int MaximumNumberOfOffPixels;
HANDLE hFaceMatchEvent;
HANDLE hAddFaceToFacebookMutex;
HANDLE hNumOfRunningThreadsSemaphore;

void main(int argc, char *argv[])
{
	// Variables decleration
	char *ImageFileName = argv[1];
	char *OutputFileName = argv[2];
	int NumOfAreasVertical = atoi(argv[5]);
	int NumOfAreasHorizontal = atoi(argv[6]);
	int MaxNumOfParallelThreads = atoi(argv[7]);
	int NumOfAreas;
	char *EndReasonFileName = "End.txt";
	
	BOOL FunctionResult;
	HANDLE LoadThread;
	DWORD LoadThreadID;
	DWORD WaitResult;
	
	TArea *Areas;

	int i;
	// End of Variables decleration

	// Initialize global variables. these do not change the entire program, so no protection is needed
	FaceSize.Width = atoi(argv[3]);
	FaceSize.Height = atoi(argv[4]);
	
	ImageReaderAndProperties = OpenImageAndGetProperties(ImageFileName);
	Image = CreateImage(ImageReaderAndProperties.Height, ImageReaderAndProperties.Width);

	Areas = DividePicToAreas(NumOfAreasHorizontal, NumOfAreasVertical); 
	ConvertImageToGrayScaleSimple();
	
	NumOfAreas = 1;
	for (i=0 ; i < NumOfAreas ; i++)
		FindFacesInAreaSimple(&Areas[i]);
	fclose(FacebookFile);
	getchar();
}
*/